package com.akuhome.resource.job;

import com.akuhome.resource.service.ReportService;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;

@Component
public class YearReportJob extends QuartzJobBean {

    Logger logger = LoggerFactory.getLogger(MonthReportJob.class);

    @Autowired
    ReportService reportService;
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext){
        logger.info("开始添加年运营报表");
        reportService.initYearReport();
        logger.info("年运营报表添加完成");
    }
}
